import {
    Entity,
    Column,
    PrimaryGeneratedColumn,
    CreateDateColumn,
} from 'typeorm';

@Entity()
export class Book {
    @PrimaryGeneratedColumn()
    id: number;
    @Column()
    name: string;
    @Column()
    cover: string;
    @Column({ type: 'int' })
    type: number;
    @Column({ type: 'int' })
    total: number;
    @Column({ nullable: true })
    describe: string;
    @CreateDateColumn({ name: 'create_time' })
    createTime: Date;
    @Column({ default: 1, name: 'is_delete' })
    isDelete: 0 | 1;
}
